-module(event).
-compile(export_all).

-record(event, {delay0, delay, auto, player, command, args}).

new(Delay, Auto, Player, Command, Args)->
    #event{delay0 = Delay, delay = Delay, auto = Auto,
           player = Player, command = Command, args = Args}.
reset(Event) ->
    delay(Event, delay0(Event)).
delay0(Event) ->
    Event#event.delay0.
delay(Event) ->
    Event#event.delay.
delay(Event, Delay) ->
    Event#event{delay = Delay}.
auto(Event) ->
    Event#event.auto.
player(Event) ->
    Event#event.player.
command(Event) ->
    Event#event.command.
args(Event) ->
    Event#event.args.

